<%@ page language="java" pageEncoding="UTF-8"%>
<%@ page import= "com.roadmap.struts.action.ActionConst"%>
<%@page import="com.roadmap.common.RdcResourceBundle;"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String user_ssn_id = (String)request.getSession().getAttribute(ActionConst.Aspirant_Id_In_Session);
String user_req_id = (String)request.getParameter(ActionConst.Aspirant_Id_In_Request);
if(user_req_id == null){
	user_req_id = user_ssn_id;
}
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base href="<%=basePath%>"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="pragma" content="no-cache"/>
<meta http-equiv="cache-control" content="no-cache"/>
<meta http-equiv="expires" content="0"/> 
<link href="res/css/layout.css" rel="stylesheet" type="text/css" media="all" />
<link href="res/css/life.css" rel="stylesheet" type="text/css" media="all" />
<script type="text/javascript" src="res/js/util.js"></script>
<script type="text/javascript" src="res/js/func.js"></script>
<title>所有任务 | <%=RdcResourceBundle.COMPANY_NAME %></title>
</head>

<body>
	<jsp:include page="/admin/myheader.jsp"></jsp:include>
	
	<!-- main body -->
	<div class="mainbody"><div class="manager">
	<jsp:include page="/admin/life/nav_btns.jsp"/>
			
		<!-- middle part: content -->
		<div class="middle-part">
			<div class="section">
				<div class="title-sp">
					<a href="aspirant.do?uid=<%=user_req_id %>"><bean:write name="<%=ActionConst.Aspirant_Name_In_Request %>"/></a>
					<span class="doubleGreat">&gt;&gt;</span>
					<logic:present name="goal">
						<% String goalId = request.getParameter(ActionConst.Parent_Id_In_Request); %>
						<a href="goal.do?act=view&uid=<%=user_req_id %>&id=<%=goalId%>">目标:&nbsp;<bean:write name="goal"/></a>
						<span class="doubleGreat">&gt;&gt;</span>
					</logic:present>
					所有任务
				</div>
				
				<logic:present name="<%=ActionConst.Visitor_Is_Owner %>">
					<div class="float-right"><a class="linkBtn" href="task.do?act=create&uid=<%=user_ssn_id %>">创建新任务</a></div>
				</logic:present>
			</div>
		
			<div class="section">
				<logic:notPresent name="tasks"><span class="prompt-message">没有相关任务</span></logic:notPresent>
				<logic:present name="tasks">
					<logic:iterate id="task" name="tasks">
						<div class="article" style="border:none;">
							<div class="title">
								<div class="tstamp">
									<div style="text-align:left;">
										<a href="task.do?act=view&uid=<%=user_req_id %>&id=<bean:write name='task' property='id'/>"><span class="title-text"><bean:write name="task" property="content"/></span></a>									
									</div>
									<div style="text-align:right;">
										<a href="exec.do?act=all&uid=<%=user_req_id %>&pid=<bean:write name='task' property='id'/>">执行记录</a>
										<span class="doubleGreat">&gt;&gt;</span>
									</div>
								</div>
								<div class="tstamp">
									预定开始时间：<b><bean:write format="yyyy-MM-dd HH:mm" name="task" property="scheduledStartDate"/></b>,
									优先级：<b><bean:define id="rank" name="task" property="taskRank"/><%=RdcResourceBundle.LIFETASK_RNAK_DESCRIPTIONS[Integer.valueOf(rank.toString())] %></b>, 
									状态：<b><bean:define id="status" name="task" property="status"/><%=RdcResourceBundle.LIFETASK_STATUS_DESCRIPTIONS[Integer.valueOf(status.toString())] %></b>, 
									占计划比重：<b><bean:write name="task" property="proportionOfGoal"/>%</b><br />
								</div>
							</div>
						</div>
					</logic:iterate>
				</logic:present>
			</div>
			<jsp:include page="/pagelet/pagingBarPagelet.jsp"/>
	</div>
	
	<!-- right part: -->
	<div class="right-part">
	</div>
	
	</div>
	
	<div class="clear-div"></div>
	</div>
	
	<jsp:include page="/res/jsp/footer.jsp"></jsp:include>
	

</body>

</html>
